package com.ruoyi.qbms.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qbms.mapper.QbmsRecordFixMapper;
import com.ruoyi.qbms.domain.QbmsRecordFix;
import com.ruoyi.qbms.service.IQbmsRecordFixService;

/**
 * 题库纠错记录Service业务层处理
 * 
 * @author zouhuu
 * @date 2022-10-19
 */
@Service
public class QbmsRecordFixServiceImpl implements IQbmsRecordFixService 
{
    @Autowired
    private QbmsRecordFixMapper qbmsRecordFixMapper;

    /**
     * 查询题库纠错记录
     * 
     * @param id 题库纠错记录主键
     * @return 题库纠错记录
     */
    @Override
    public QbmsRecordFix selectQbmsRecordFixById(Long id)
    {
        return qbmsRecordFixMapper.selectQbmsRecordFixById(id);
    }

    /**
     * 查询题库纠错记录列表
     * 
     * @param qbmsRecordFix 题库纠错记录
     * @return 题库纠错记录
     */
    @Override
    public List<QbmsRecordFix> selectQbmsRecordFixList(QbmsRecordFix qbmsRecordFix)
    {
        return qbmsRecordFixMapper.selectQbmsRecordFixList(qbmsRecordFix);
    }

    /**
     * 新增题库纠错记录
     * 
     * @param qbmsRecordFix 题库纠错记录
     * @return 结果
     */
    @Override
    public int insertQbmsRecordFix(QbmsRecordFix qbmsRecordFix)
    {
        qbmsRecordFix.setCreateTime(DateUtils.getNowDate());
        return qbmsRecordFixMapper.insertQbmsRecordFix(qbmsRecordFix);
    }

    /**
     * 修改题库纠错记录
     * 
     * @param qbmsRecordFix 题库纠错记录
     * @return 结果
     */
    @Override
    public int updateQbmsRecordFix(QbmsRecordFix qbmsRecordFix)
    {
        qbmsRecordFix.setUpdateTime(DateUtils.getNowDate());
        return qbmsRecordFixMapper.updateQbmsRecordFix(qbmsRecordFix);
    }

    /**
     * 批量删除题库纠错记录
     * 
     * @param ids 需要删除的题库纠错记录主键
     * @return 结果
     */
    @Override
    public int deleteQbmsRecordFixByIds(Long[] ids)
    {
        return qbmsRecordFixMapper.deleteQbmsRecordFixByIds(ids);
    }

    /**
     * 删除题库纠错记录信息
     * 
     * @param id 题库纠错记录主键
     * @return 结果
     */
    @Override
    public int deleteQbmsRecordFixById(Long id)
    {
        return qbmsRecordFixMapper.deleteQbmsRecordFixById(id);
    }
}
